home *** CD-ROM | disk | FTP | other *** search
- /*******************************<+>***************************
- ** DTA
- *************************************************************
- **
- ** $Id: Odmg.h,v 1.5 1994/02/24 05:14:46 dta Exp $
- **
- ** $Source: /cvs/lib/odmg/Odmg.h,v $
- **
- ** What @(#):
- **
- ** Author: Dale T. Anderson
- **
- *******************************<+>***************************/
-
- #ifndef _Odmg_h
- #define _Odmg_h
-
- #include <Odmg/Ref.h>
-
- class CPobject
- {
- public:
-
- mark_modified ();
- };
-
- enum lock_type {
- read_lock,
- write_lock,
- default_lock,
- };
-
- class CTransaction
- {
- public:
- CTransaction ();
- ~CTransaction ();
- void start ();
- void commit ();
- void abort ();
- void checkpoint ();
- };
-
- enum AccessStatus {
- NotOpen,
- ReadWrite,
- ReadOnly,
- Exclusive
- };
-
- class CDatabase
- {
- public:
-
- open (const char *database_name, AccessStatus status = ReadWrite);
- close ();
- //delete ();
- void name (const Ref<CPobject> theObject, const char *theName);
- const char *name (Ref<CPobject> theObject);
- void rename (const char *oldName, const char *newName);
- void lookup (const Ref<CPobject> &o, const char *name, lock_type lock = default_lock);
- };
-
- #endif
-